package com.kaifamiao.N0719;

public class Node5 {
    public static void main(String[] args) {

        int[] num1 = {155, 167, 176, 165, 178, 188, 185, 180};
        //选择排序
        for (int n = 0; n < num1.length; n++) {
            for (int x = 0; x < num1.length; x++) {
                int i = x;
                for (int y = i; y < num1.length; y++) {
                    if (num1[y] > num1[i]) {
                        i = y;
                    }
                }
                int o = num1[i];
                num1[i] = num1[x];
                num1[x] = o;
            }
        }
        for (int x = 0; x < num1.length; x++) {
            System.out.println(num1[x]);
        }
    }
}